package homework24;

public class Teacher extends Employee{
    String subject;

    public Teacher(String name, String subject) {
        super(name);
        this.subject = subject;
    }

    @Override
    public void work() {
        System.out.println(name + "正在教授" + subject);
    }
}
